<div appBsModal #selectionModal="bs-modal" class="modal fade popover-sm popover-addrole" tabindex="-1" role="dialog"
    aria-labelledby="selectionModal" aria-hidden="true" [config]="{backdrop: 'static'}">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <form novalidate (ngSubmit)="save()">
                <div class="modal-header">
                    <h4 class="modal-title">
                        <span>部门选择</span>
                    </h4>
                    <button type="button" class="close" (click)="close()" [attr.aria-label]="l('Close')">
                        <i aria-hidden="true" class="bi bi-x"></i>
                    </button>
                </div>
                <div class="modal-body">
                    <!-- level1 start -->
                    <div class="flownext-level1">
                        <div class="levl-top">
                            <a class="btn" (click)="openAll()"><img
                                [src]="appRootUrl() + 'assets/common/images/icon_zk.png'" />全部展开</a>
                            <a class="btn" (click)="closeAll()"><img
                                [src]="appRootUrl() + 'assets/common/images/icon_sq.png'" />全部折叠</a>
                        </div>
                        <div class="levl-inner">
                            <div id="menusUnitId">
                                <p-tree [value]="treeData" [(selection)]="selectedTreeData" selectionMode="checkbox"
                                (onNodeSelect)="nodeSelect($event)" (onNodeUnselect)="onNodeUnselect($event)" [propagateSelectionUp]="true" [propagateSelectionDown]="true">
                            </p-tree>
                            </div>
                        </div>
                    </div>
                    <!-- level1 end -->
                    <!-- level2 start -->
                    <div class="flownext-level2" style="display:none">
                        <div class="flownext-tree scrollbox">

                        </div>
                    </div>
                    <!-- level2 end -->
                    <!-- flownext-det start -->
                    <div class="flownext-det">
                        <h5 class="tit">已选部门</h5>
                        <ul class="flownext-list">
                            <li style="display:none;">
                                <h5 class="name">李宝贤</h5>
                                <div class="tool-box">
                                    <a href="javascript:void(0)" class="tool tool-up"></a>
                                    <a href="javascript:void(0)" class="tool tool-down"></a>
                                    <a href="javascript:void(0)" class="tool tool-del"></a>
                                </div>
                            </li>

                            <li *ngFor="let item of selectedTreeData">
                                <h5 class="name">{{item.data.displayName}}</h5>
                            </li>

                        </ul>
                    </div>
                    <!-- flownext-det end -->
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-light-primary font-weight-bold" (click)="close()">{{"Cancel" |
                        localize}}</button>
                    <button type="button" class="btn blue" (click)="clearAllData()">清空</button>
                    <button type="submit" class="btn blue"><span>{{"Save" | localize}}</span></button>
                </div>
            </form>
        </div>
    </div>
</div>
